package edu.cth.speedapp.old;

import edu.cth.speedapp.R;
import android.app.Activity;
import android.content.Intent;
import android.nfc.NfcAdapter;
import android.nfc.Tag;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

//This is the activity that starts directly if an rfid tag is found
public class DirectRFIDActivity extends Activity {
	
	private TextView statusText;
	private View loginButton;
	private View statusProgress;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.setContentView(R.layout.activity_rfid_direct);
		
		Intent intent = this.getIntent();
        Tag tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);
        if(tag != null){
	   		//Toast.makeText(this, tag.toString(), Toast.LENGTH_SHORT).show();
	   	}
        statusText = (TextView) findViewById(R.id.dirRFIDstatusText);
        loginButton = findViewById(R.id.dirRFIDloginButton);
        statusProgress = findViewById(R.id.dirRFIDstatusProgress);
        serverResponse();
	}
	
	private void serverResponse(){
		loginButton.setVisibility(View.VISIBLE);
		statusProgress.setVisibility(View.INVISIBLE);
		statusText.setText("Enter room " + "<ROOM NAME>" + "?");
		
	}

	public void onClickLogin(View v){
		
	
	}
}
